import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
  state: {
    user: null,
    isUpdate: false,
    // dept: null,
    // deptId: null
  },
  mutations: {
    setUser (state, user) {
      state.user = user
    },
    setIsUpdate (state, isUpdate) {
      state.isUpdate = isUpdate
    },
    // setDept (state, dept) { // 2019.8.20我的部门问题
    //   state.dept = dept
    // },
    // setDeptId (state, deptId) { // 2019.8.20我的部门问题
    //   state.deptId = deptId
    // }
  }
})

export default store
